<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background: url(../../作业/images/course01.png) no-repeat top center/cover;
        }
    </style>
</head>
<body>
    <img src="../../作业/images/course01.png" alt="">
    <script>
        function fn(){
            return Math.floor(Math.random()*(M-N+1)+N)
        }
        fn(1,6)
        const pic=document.querySelector('img')
        pic.src=`../../作业/images${fen(1,6)}`
        function getRandom(M,N){
            return Math.floor(Math.random()*(M-N+1)-N)
        }
        const random=getRandom(1,10)
        document.body.style.background=`url(../../作业/images/course${random}.png)`
    </script>
</body>
</html>